USE [comunion]
GO
/****** Object:  StoredProcedure [dbo].[rsp_Transaction_Voucher]    Script Date: 08/10/2010 12:01:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--EXEC [rsp_supplier] 'ASC'
--Stored Procedure for Transactional Printout (Voucher Printing)
CREATE  PROCEDURE [dbo].[rsp_supplier]

	@cCompID VARCHAR(10)

AS 
SELECT a.cName AS DESCRIPTION, a.cCode AS id FROM (
	SELECT cName, cCode  FROM client_supplier  WHERE cCompanyID = @cCompID
	UNION ALL
	SELECT   cNAME, cCode from client_supplier_nt  WHERE cCompanyID = @cCompID) a ORDER BY cName